#include <iostream>
using namespace std;

int main(void)
{
    int n;
    cin >> n; // 输入一个任意位的整数
    
    while(n > 0)
    {
        cout << n % 10 << " ";
        n = n/10;
    }

    cout << endl;
}